﻿<%@ WebHandler Language="C#" Class="CheckLogin" %>

using System;
using System.Web;
using TFXK.Model;

public class CheckLogin : IHttpHandler, System.Web.SessionState.IRequiresSessionState
{

    public void ProcessRequest(HttpContext context)
    {
        context.Response.ContentType = "text/plain";
        context.Response.StatusCode = 200;
        try
        {
            Customs cusModel = (Customs)System.Web.HttpContext.Current.Session["UserLogin"];
            if (cusModel != null)
            {
                context.Response.Write("1");
            }
            else
            {
                context.Response.Write("0");
            }
        }
        catch
        {
            context.Response.Write("0");
        }

    }

    public bool IsReusable
    {
        get
        {
            return false;
        }
    }

}